
<template>
	<el-dialog title="" visible :show-close="false" :modal-append-to-body="false" class="wrap" size="tiny">
		 <div class="bt">退费详情</div>
		<i class="el-icon-close close" @click="cancel" style="color: white;"></i>
		<el-form label-width="80px" class="form">
			<el-form-item label="学生名称">
				  <el-input v-model="form.zwm" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="学生学号">
				  <el-input v-model="form.xh" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="退费金额">
				  <el-input v-model="form.tfje" :readonly="true" icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item class="item" label="退费类型">
					<!-- <el-select v-model="form.tfsklx" placeholder="请选择退费类型" class="select-block">
							<el-option :label="v" :value="v" v-for="v in typeList"></el-option>
					</el-select> -->
					<el-select v-model="tfsklx" class="select-block">
							<el-option label="支付宝" value="支付宝"></el-option>
							<el-option label="微信" value="微信"></el-option>
							<el-option label="银行卡" value="银行卡"></el-option>
							<el-option label="余额" value="余额"></el-option>
					</el-select>
			</el-form-item>
			<el-form-item  label="退费账号" >
					<el-input v-model="tfzh" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="退费原因">
				 <!-- <el-input v-model="form.ms" :readonly="true" icon="info" class="select-block"></el-input>-->
				  <el-input type="textarea"   :rows="4"  v-model="tfyy"  icon="info" class="select-block" ></el-input>
			</el-form-item>

		</el-form>
		<el-button type="info" class="submit" @click="loadinfo">确定</el-button>
	</el-dialog>
</template>

<script type="text/javascript">
	import qs from 'qs'
	export default {
		props: ['params'],
		data() {
			return {
				form: {
					mc: '',
					ms:'',
				},
				tfzh:'',
				tfsklx:'',
				tfyy:''
			}
		},
		created() {
			console.log(this.params.row)
           this.form=this.params.row;
		},
		methods: {
			loadinfo(){
				 var logininfo = JSON.parse(localStorage.logininfo) ;
				 var params3 = qs.stringify({
					 xxid:logininfo.xxid,
					 xsid:this.form.xsid,
					 tfje:this.form.tfje,
					 tfyy:this.tfyy,
					 tfsklx:this.tfsklx,
					 tfzh:this.tfzh,
					 xsksid:this.form.id,
						});
				 this.axios.pust(this.$store.state.api+'xstf/add',params3)
				 .then( res =>  {
							// this.form=res.data.data
							this.$emit('close', { type: 'info', cancel: true })
					 }).catch(res => {
						 this.$message.warning("服务器异常");
			 				this.$emit('close', { type: 'info', cancel: true });
					 })
			},
			cancel() {
				this.$emit('close', { type: 'info', cancel: true })
			}
		}
	}
</script>

<style lang="less" scoped>
	.wrap {
		text-align: center;
	}
	.bt{
			width: 110.5%;
			height: 50px;
			margin: 0 auto;
			margin-top: -50px;
			background: #50BFFF;
			margin-left: -20px;
			margin-bottom: 20px;
			color:white;
			text-align:left;
			line-height: 50px;
			font-size: 17px;
			padding-left: 15px;
		}
	.form {
		text-align: left;
	}
	 .input {
            width: 285px;
            display: inline-block;
        }

	.select-block {
		display: block;
		width: 230px;
	}

	.submit {
		width: 120px;
	}
</style>
